package com.meitianhui.convenitenbuy.module.home.di;

import android.app.Activity;

import com.meitianhui.convenitenbuy.di.PerActivity;
import com.meitianhui.convenitenbuy.module.home.presenter.BrandWebViewPresenter;
import com.meitianhui.convenitenbuy.module.home.presenter.EdinburghWebViewPresenter;
import com.meitianhui.convenitenbuy.module.home.presenter.FightGroupAddressPresenter;
import com.meitianhui.convenitenbuy.module.home.presenter.FreePaperPresenter;
import com.meitianhui.convenitenbuy.module.home.presenter.HomeCollectionPresenter;
import com.meitianhui.convenitenbuy.module.home.presenter.HomePresenter;
import com.meitianhui.convenitenbuy.module.home.presenter.HomeScanningPresenter;
import com.meitianhui.convenitenbuy.module.home.presenter.HomeSearchPresenter;
import com.meitianhui.convenitenbuy.module.home.presenter.IntegrationPresenter;
import com.meitianhui.convenitenbuy.module.home.presenter.NearByStorePresenter;
import com.meitianhui.convenitenbuy.module.home.presenter.OpenFightGroupPresenter;
import com.meitianhui.convenitenbuy.module.home.presenter.SubmitOrderPresenter;
import com.meitianhui.convenitenbuy.module.home.presenter.ZeroBuyPresenter;
import com.meitianhui.convenitenbuy.module.home.ui.HomeFragment;
import com.meitianhui.convenitenbuy.module.home.ui.activity.FightGroupAddressActivity;
import com.meitianhui.convenitenbuy.module.home.ui.activity.FreePaperActivity;
import com.meitianhui.convenitenbuy.module.home.ui.activity.HomeCollectionActivity;
import com.meitianhui.convenitenbuy.module.home.ui.activity.HomeScanCodeActivity;
import com.meitianhui.convenitenbuy.module.home.ui.activity.HomeSearchActivity;
import com.meitianhui.convenitenbuy.module.home.ui.activity.IntegrationActivity;
import com.meitianhui.convenitenbuy.module.home.ui.activity.JoinFightGroupActivity;
import com.meitianhui.convenitenbuy.module.home.ui.activity.NearByStoreActivity;
import com.meitianhui.convenitenbuy.module.home.ui.activity.OpenFightGroupActivity;
import com.meitianhui.convenitenbuy.module.home.ui.activity.SubmitOrderActivity;
import com.meitianhui.convenitenbuy.module.home.ui.activity.ZeroBuyActivity;
import com.meitianhui.convenitenbuy.module.home.ui.activity.web.BrandWebViewActivity;
import com.meitianhui.convenitenbuy.module.home.ui.activity.web.EdinburghWebViewActivity;

import dagger.Module;
import dagger.Provides;

@Module
public class HomeModule {

    private Activity mActivity;
    private HomePresenter homePresenter;
    private EdinburghWebViewPresenter edinburghWebViewPresenter;
    private HomeSearchPresenter homeSearchPresenter;
    private OpenFightGroupPresenter openFightGroupPresenter;
    private FightGroupAddressPresenter fightGroupAddressPresenter;
    private FreePaperPresenter freePaperPresenter;
    private BrandWebViewPresenter brandWebViewPresenter;
    private HomeScanningPresenter scanningPresenter;
    private HomeCollectionPresenter homeCollectionPresenter;
    private NearByStorePresenter nearByStorePresenter;
    private IntegrationPresenter integrationPresenter;
    private SubmitOrderPresenter mSubmitOrderPresenter;
    private ZeroBuyPresenter zeroBuyPresenter;

    public HomeModule(Activity activity) {
        this.mActivity = activity;
    }

    @Provides
    @PerActivity
    public Activity provideActivity() {
        return mActivity;
    }


    public HomeModule(HomeFragment activity) {
        homePresenter = new HomePresenter(activity, activity);
    }

    @Provides
    HomePresenter provideHome() {
        return homePresenter;
    }

    public HomeModule(EdinburghWebViewActivity activity) {
        edinburghWebViewPresenter = new EdinburghWebViewPresenter(activity, activity);
    }

    @Provides
    EdinburghWebViewPresenter provideEdinburghWebView() {
        return edinburghWebViewPresenter;
    }

    public HomeModule(HomeSearchActivity activity) {
        homeSearchPresenter = new HomeSearchPresenter(activity, activity);
    }

    @Provides
    HomeSearchPresenter provideHomeSearch() {
        return homeSearchPresenter;
    }

    public HomeModule(OpenFightGroupActivity activity) {
        openFightGroupPresenter = new OpenFightGroupPresenter(activity, activity);
    }

    public HomeModule(JoinFightGroupActivity activity) {
        openFightGroupPresenter = new OpenFightGroupPresenter(activity, activity);
    }

    @Provides
    OpenFightGroupPresenter provideOpenFightGroup() {
        return openFightGroupPresenter;
    }

    public HomeModule(FightGroupAddressActivity activity) {
        fightGroupAddressPresenter = new FightGroupAddressPresenter(activity, activity);
    }

    @Provides
    FightGroupAddressPresenter provideFightGroupAddress() {
        return fightGroupAddressPresenter;
    }

    public HomeModule(FreePaperActivity activity) {
        freePaperPresenter = new FreePaperPresenter(activity, activity);
    }

    @Provides
    FreePaperPresenter provideFreePaper() {
        return freePaperPresenter;
    }


    public HomeModule(BrandWebViewActivity activity) {
        brandWebViewPresenter = new BrandWebViewPresenter(activity, activity);
    }

    @Provides
    BrandWebViewPresenter provideBrandWebView() {
        return brandWebViewPresenter;
    }

    public HomeModule(HomeScanCodeActivity activity) {
        scanningPresenter = new HomeScanningPresenter(activity, activity);
    }

    @Provides
    HomeScanningPresenter provideScanningPresenter() {
        return scanningPresenter;
    }

    public HomeModule(HomeCollectionActivity activity) {
        homeCollectionPresenter = new HomeCollectionPresenter(activity, activity);
    }

    @Provides
    HomeCollectionPresenter provideHomeCollection() {
        return homeCollectionPresenter;
    }

    public HomeModule(NearByStoreActivity activity) {
        nearByStorePresenter = new NearByStorePresenter(activity, activity);
    }

    @Provides
    NearByStorePresenter provideNearByStore() {
        return nearByStorePresenter;
    }

    public HomeModule(IntegrationActivity activity) {
        integrationPresenter = new IntegrationPresenter(activity, activity);
    }

    @Provides
    IntegrationPresenter provideIntegration() {
        return integrationPresenter;
    }

    public HomeModule(SubmitOrderActivity activity) {
        mSubmitOrderPresenter = new SubmitOrderPresenter(activity, activity);
    }

    @Provides
    SubmitOrderPresenter provideSubmitOrder() {
        return mSubmitOrderPresenter;
    }

    public HomeModule(ZeroBuyActivity activity) {
        zeroBuyPresenter = new ZeroBuyPresenter(activity);
    }

    @Provides
    ZeroBuyPresenter provideZeroBuy() {
        return zeroBuyPresenter;
    }

}
